package org.mspring.mlog.entity;

import java.util.Date;
import org.mspring.nbee.db.annotation.AutoIncrement;
import org.mspring.nbee.db.annotation.Col;
import org.mspring.nbee.db.annotation.Id;
import org.mspring.nbee.db.annotation.Mappable;
import org.mspring.nbee.db.entity.BaseEntity;
import org.mspring.nbee.db.orm.EntityField;

/**
 *
 * @author Gao Youbo
 * @since 2016-06-05 10:10:14
 */
@Mappable
public class CommentEntity extends BaseEntity {

    @Id
    @AutoIncrement
    @Col(length = 19)
    private Long id;
    @Col(nullable = false, length = 19)
    private long articleId;
    @Col(nullable = false, length = 10)
    private int status;
    @Col(length = 19)
    private Long replyId;
    @Col(nullable = false, length = 65535)
    private String content;
    @Col(nullable = false, length = 32)
    private String authorName;
    @Col(length = 1024)
    private String authorAvatar;
    @Col(length = 1024)
    private String authorEmail;
    @Col(length = 512)
    private String authorUrl;
    @Col(length = 32)
    private String ip;
    @Col(length = 2048)
    private String agent;
    @Col(length = 1024)
    private String renferer;
    @Col(nullable = false, length = 19)
    private Date createTime;
    @Col(nullable = false, length = 19)
    private long duoshuoCommentId;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getArticleId() {
        return this.articleId;
    }

    public void setArticleId(long articleId) {
        this.articleId = articleId;
    }

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Long getReplyId() {
        return this.replyId;
    }

    public void setReplyId(Long replyId) {
        this.replyId = replyId;
    }

    public String getContent() {
        return this.content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthorName() {
        return this.authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getAuthorAvatar() {
        return this.authorAvatar;
    }

    public void setAuthorAvatar(String authorAvatar) {
        this.authorAvatar = authorAvatar;
    }

    public String getAuthorEmail() {
        return this.authorEmail;
    }

    public void setAuthorEmail(String authorEmail) {
        this.authorEmail = authorEmail;
    }

    public String getAuthorUrl() {
        return this.authorUrl;
    }

    public void setAuthorUrl(String authorUrl) {
        this.authorUrl = authorUrl;
    }

    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getAgent() {
        return this.agent;
    }

    public void setAgent(String agent) {
        this.agent = agent;
    }

    public String getRenferer() {
        return this.renferer;
    }

    public void setRenferer(String renferer) {
        this.renferer = renferer;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public long getDuoshuoCommentId() {
        return this.duoshuoCommentId;
    }

    public void setDuoshuoCommentId(long duoshuoCommentId) {
        this.duoshuoCommentId = duoshuoCommentId;
    }

    public static class Fields {
        public static final EntityField id = new EntityField("id", "id", Long.class, 19, false);
        public static final EntityField articleId = new EntityField("articleId", "article_id", long.class, 19, false);
        public static final EntityField status = new EntityField("status", "status", int.class, 10, false);
        public static final EntityField replyId = new EntityField("replyId", "reply_id", Long.class, 19, true);
        public static final EntityField content = new EntityField("content", "content", String.class, 65535, false);
        public static final EntityField authorName = new EntityField("authorName", "author_name", String.class, 32, false);
        public static final EntityField authorAvatar = new EntityField("authorAvatar", "author_avatar", String.class, 1024, true);
        public static final EntityField authorEmail = new EntityField("authorEmail", "author_email", String.class, 1024, true);
        public static final EntityField authorUrl = new EntityField("authorUrl", "author_url", String.class, 512, true);
        public static final EntityField ip = new EntityField("ip", "ip", String.class, 32, true);
        public static final EntityField agent = new EntityField("agent", "agent", String.class, 2048, true);
        public static final EntityField renferer = new EntityField("renferer", "renferer", String.class, 1024, true);
        public static final EntityField createTime = new EntityField("createTime", "create_time", Date.class, 19, false);
        public static final EntityField duoshuoCommentId = new EntityField("duoshuoCommentId", "duoshuo_comment_id", long.class, 19, false);
    }
}
